# Copyright (c) 2024, lanlian and contributors
# For license information, please see license.txt

import json

import frappe
from frappe import _, msgprint
from frappe.model.mapper import get_mapped_doc
from frappe.utils import cint, cstr, flt
from frappe.model.document import Document


class EMSEquipmentAcceptance(Document):
	pass

@frappe.whitelist()
def make_equitment_card(source_name, target_doc=None, args=None):
	doc = get_mapped_doc(
		"EMS Equipment Acceptance",
		source_name,
		{
			"EMS Equipment Acceptance": {
				"doctype": "EMS Equipment Card",
				"field_map": {},
				"validation": {"docstatus": ["=", 1],},
			},
		},
		target_doc,
		ignore_permissions=True,
	)

	return doc